package com.hframe.typefilter;

/**
 * 字符串转数字
 *
 * @author Administrator
 */
public class StringToFloat implements FilterRef<Float, Object> {
    @Override
    public Float filter(Object object) throws Exception {
        return Float.parseFloat((String) object);
    }

    public static Float parse(String object) {
        try{
            return Float.parseFloat(object);
        }catch (Exception e){
            return null;
        }

    }
}